import React from "react";
// 前后端分离 前端独立的路由功能
import {
// HashRouter as Rouer,
//es6模块化语法
BrowserRouter as Router,//hash #,history /
Routes,
Route
} from 'react-router-dom'
import routes from './router'
export default function App(){
    return (
        //路由对象
    <Router>
        <Routes>
            { routes.map(route=><Route path={route.path} element={<route.component/>}/>)}
        </Routes>
    </Router>
    )
}
